{% extends "base.html" %}
{% block title %}Webmapper Tags{% endblock %}

{% block content %}
<div class="contentbox">
<h2>Welcome to Webmapper!</h2>
<div>
Webmapper is a django-based tool for creating and displaying customized 
maps.
</div>
{% if user.is_authenticated %}
    <h3>Dashboard</h3>
    Edit maps using the <a href="{% url dashboard %}">dashboard</a>.<br />
{% else %}
    <h3>Login</h3>
    <div>Why don't you
    <a href="{% url auth_login %}?next={{ request.path|default:"/" }}">login</a>
    or <a href="{% url registration_register %}?next={{ request.path|default:"/" }}">register</a>
    and get started creating maps?</div>
{% endif %}

        <h3>Maps</h3>
        <ul>
{% if user.is_authenticated %}
            <li><a href="{% url map-create %}">Create New Map</a></li>
{% endif %}
{% if map_list %}
            <li>Current Maps:<br />
                <div style="background-color: lightblue; width: 600px;">
                {% for map in map_list %}
                    <b>{{ map.title }}</b>
{% if user.is_authenticated %}
                    (<a href="{% url map-edit map.pk %}">edit</a>)
{% endif %}
                    : <a href="{% url map-snap map.unique_name %}">Map Snap</a>
                    | Overview (coming later)<br/>
                {% endfor %}
                </div>
            </li>
{% endif %}
        </ul>
</div>
{% endblock %}
